package com.example.apple.hxbtc.utils;

import java.text.DecimalFormat;

/**
 * Created by hpz on 17/2/23.
 */

public class MathUtil {
    public static String change_one(String s){
        double i=Double.parseDouble(s);
        double a = i/100 ;
        DecimalFormat df=new DecimalFormat(".####");
        double d=Double.valueOf(df.format(a));
        String aa = d + "";
        return aa;
    }

    public static double change_two(String s){
        double i=Double.parseDouble(s);
        double a = i ;
        DecimalFormat df=new DecimalFormat(".##");
        double d=Double.valueOf(df.format(a));
        return d;
    }

    public static String change_three(String s){
        double i=Double.parseDouble(s);
        double a = i/100 ;
        DecimalFormat df=new DecimalFormat(".##");
        double d=Double.valueOf(df.format(a));
        String aa = d + "";
        return aa;
    }
}
